package com.AEWMS.Test;

import com.AEWMS.Dao.CourseScore;
import com.AEWMS.Service.CourseScoreService;
import com.alibaba.fastjson.JSON;

public class CourseScoreTest {
    public static void main(String[] args) {
        CourseScoreService css  = new CourseScoreService();
        CourseScore cs = new CourseScore();

//        System.out.println(JSON.toJSONString(css.findCourseScoreById("117583010123")));
//        cs.setStuId("1");
//        cs.setCourseId("2");
//        cs.setCourseScore("63");
//        cs.setStudySemester("2020");
//        cs = css.findCourseScoreById("1","2");
//        System.out.println(JSON.toJSONString(cs));
//        cs.setCourseScore("50");
//        if(css.updateCourseScore(cs)){
//            System.out.println("updateCourseScore 成功");
//            System.out.println("修改后的信息"+ JSON.toJSONString(css.findCourseScoreById("1","2")));
//        }else{
//            System.out.println("updateCourseScore 失败");
//        }
//        System.out.println(JSON.toJSONString(css.updateCourseScore(cs)));
//        System.out.println(css.deleteCourseScoreById("1","1","2020"));
        String studentNumber = "117583030114";
        String courseId = "1";
        String courseScore = "57";
        System.out.println(JSON.toJSONString(css.updateCourseScore(studentNumber, courseId,courseScore)));
        if (css.updateCourseScore(studentNumber, courseScore,courseId)) {
            System.out.println(JSON.toJSONString(css.updateCourseScore(studentNumber, courseId,courseScore)));
        }
        else{
            System.out.println("更改失败");
        }

    }
}
